package edu.whu.puppygo.service;

import edu.whu.puppygo.dto.PetMatterDto;
import edu.whu.puppygo.dto.PostDto;
import edu.whu.puppygo.entity.PetMatter;
import edu.whu.puppygo.entity.Post;
import org.springframework.data.domain.Pageable;
import org.springframework.web.multipart.MultipartFile;

import java.time.LocalDate;
import java.util.List;

/**
 * @Author llx
 * @Date 2024-4-25
 */
public interface PostService {

    //查询所有帖子
    List<Post> getAllPosts(Pageable pageable);

    // 根据用户nickname获取所有的Post
    List<Post> getAllPostsByNickname(String nickname, Pageable pageable);


    // 根据用户ID获取所有的Post
    List<Post> getAllPostsByUserId(Long userId, Pageable pageable);

    //发布帖子
    Post publishPost(PostDto postDto, MultipartFile mpfile);

    //更新帖子
    Post updatePost(Post post);

    //删除帖子
    void deletePost(Long postId);
}
